package com.shenfc.fxzj.domain;

/**
 * 分页Model类
 *
 * @author
 */
public class PageBean {
	/*默认第一页*/
	private int page = 1;
	/*默认每页10条*/
	private int limit = 10;
	/*总数*/
	private long recTotal;
	/*起始页*/
	private int start;

	public PageBean() {
	}

	public PageBean(int page, int limit) {
		super();
		this.page = page;
		this.limit = limit;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page == 0 ? 1 : page;
	}

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

	public int getStart() {
		return (page - 1) * limit;
	}

	public long getRecTotal() {
		return recTotal;
	}

	public void setRecTotal(long recTotal) {
		this.recTotal = recTotal;
	}

	@Override
	public String toString() {
		return "PageBean{" +
				"page=" + page +
				", limit=" + limit +
				", recTotal=" + recTotal +
				", start=" + start +
				'}';
	}
}
